<?php
	require_once ("db_connection.php");
	$id = "AP-" . uniqid();
	$affiliateid = $_POST['affiliateid'];

	$query = "INSERT INTO airport(airportid, affiliateid,airportname, airportaddress )
	VALUES('$id','$affiliateid ','$_POST[airportname]', '$_POST[airportaddr]')";

	
	if(!mysql_query($query, $con)){
		die('Error: '. mysql_error());
	}
	echo "Saved!";
	
	mysql_close($con);
?>